package pers.qianyu.module.core.domain.logging.dto;


import com.alibaba.excel.annotation.*;
import com.alibaba.excel.annotation.format.*;
import pers.qianyu.module.core.domain.logging.converter.*;

import java.io.*;
import java.time.*;

/**
 * Excel 导出实体对象
 *
 * @author mizzle rain
 * @date 2020年11月2日20:44:00
 */
public class RequestLogExportDTO implements Serializable {
    private static final long serialVersionUID = 4414669106904225190L;
    @ExcelProperty(value = "ip地址", index = 0)
    private String ip;
    @ExcelProperty(value = "位置信息", index = 1)
    private String address;
    @ExcelProperty(value = "请求地址", index = 2)
    private String url;
    @ExcelProperty(value = "浏览器标识", index = 3)
    private String userAgent;
    @ExcelProperty(value = "请求方法", index = 4)
    private String requestMethod;
    @ExcelProperty(value = "执行函数签名", index = 5)
    private String classMethod;
    @ExcelProperty(value = "参数", index = 6)
    private String requestParameters;
    @ExcelProperty(value = "返回结果", index = 7)
    private String result;
    @ExcelProperty(value = "异常信息", index = 8)
    private String exception;
    @ExcelProperty(value = "浏览器信息", index = 9)
    private String browserInfo;
    @ExcelProperty(value = "创建时间", index = 10, converter = LocalDateTimeStringConverter.class)
    @DateTimeFormat("yyyy年MM月dd日HH时mm分ss秒")
    private LocalDateTime createTime;
    @ExcelProperty(value = "业务类型", index = 11)
    private String businessType;

    public String getBusinessType() {
        return businessType;
    }

    public void setBusinessType(String businessType) {
        this.businessType = businessType;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUserAgent() {
        return userAgent;
    }

    public void setUserAgent(String userAgent) {
        this.userAgent = userAgent;
    }

    public String getRequestMethod() {
        return requestMethod;
    }

    public void setRequestMethod(String requestMethod) {
        this.requestMethod = requestMethod;
    }

    public String getClassMethod() {
        return classMethod;
    }

    public void setClassMethod(String classMethod) {
        this.classMethod = classMethod;
    }

    public String getRequestParameters() {
        return requestParameters;
    }

    public void setRequestParameters(String requestParameters) {
        this.requestParameters = requestParameters;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public String getException() {
        return exception;
    }

    public void setException(String exception) {
        this.exception = exception;
    }

    public String getBrowserInfo() {
        return browserInfo;
    }

    public void setBrowserInfo(String browserInfo) {
        this.browserInfo = browserInfo;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "RequestLogExportDTO{" +
                "ip='" + ip + '\'' +
                ", address='" + address + '\'' +
                ", url='" + url + '\'' +
                ", userAgent='" + userAgent + '\'' +
                ", requestMethod='" + requestMethod + '\'' +
                ", classMethod='" + classMethod + '\'' +
                ", requestParameters='" + requestParameters + '\'' +
                ", result='" + result + '\'' +
                ", exception='" + exception + '\'' +
                ", browserInfo='" + browserInfo + '\'' +
                ", createTime=" + createTime +
                ", businessType='" + businessType + '\'' +
                '}';
    }
}
